﻿CREATE TABLE [dbo].[DimEDICorrelation]
(
[RecordID] [bigint] NULL,
[ActivityID] [nvarchar] (128) NULL,
[BTSMessageID] [nvarchar] (100) NULL,
[BTSInterchangeID] [nvarchar] (100) NULL,
[ISA13_New_InterchangeControlNumber] [nvarchar] (100) NULL,
[ISA13_Original_InterchangeControlNumber] [nvarchar] (100) NULL,
[GS06_New_GroupConrolNumber] [nvarchar] (100) NULL,
[GS06_Original_GroupControlNumber] [nvarchar] (100) NULL,
[ST02_New_TransactionSetControlNumber] [nvarchar] (100) NULL,
[ST02_Original_TransactionSetControlNumber] [nvarchar] (100) NULL,
[BTSMessageID_Original] [nvarchar] (100) NULL,
[ST01_TransactionSetIDCode] [nvarchar] (50) NULL,
[BTSInterchangeID_Original] [nvarchar] (100) NULL,
[EDICorrelationID_key] [int] NOT NULL IDENTITY(1, 1),
[Receive_UTC] [datetime] NULL,
[Receive_LocalTime] AS (dateadd(hour, -datediff(hour,getdate(),getutcdate()),[Receive_UTC])),
[EDIEnvelope_ParentID_key] [int] NULL,
[InsertDate] [datetime] NULL
) ON [PRIMARY]


